home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4442 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.lang.c++
  2. Path: cs.vu.nl!jalten
  3. From: jalten@cs.vu.nl (Alten JP)
  4. Subject: Re: Minimizing Windows
  5. Nntp-Posting-Host: kits.cs.vu.nl
  6. References: <96013022402735247@welcom.gen.nz>
  7. Sender: news@cs.vu.nl
  8. Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
  9. Date: Tue, 30 Jan 1996 12:43:47 GMT
  10. X-Newsreader: TIN [version 1.2 PL2]
  11. Message-ID: <DLzvD0.Gp5.0.-s@cs.vu.nl>
  12.  
  13. Ed Tissink (ed.tissink@welcom.gen.nz) wrote:
  14. : Using Turbo C++ 4.5 with OWL 2.5 I am trying to write a program which,
  15. : upon clicking OK in a dialog box, minimizes the main application window,
  16. : but have had very little success in doing so.
  17.  
  18. : Generating, displaying and closing the dialog box is no problem but I am
  19. : unable to tell the application to minimize itself.  I have experimented
  20. : with 'Show(SW_MINIMIZE)' and 'ShowWindow(SW_MINIMIZE)' (and a variety of
  21. : other options) but even though when the command is executed a WM_SIZE
  22. : message generated, the window remains on the screen in it's original
  23. : size, and the command appears to have been completely ignored.
  24.  
  25. This works for me:
  26. GetApplication()->GetMainWindow()->ShowWindow(SW_MINIMIZE);
  27.  
  28. It will find the main windows for you, and tell it to iconize.
  29. If it doesnt work, mail me for/with more info
  30.  
  31. Jelle Paul
  32.  
  33. --
  34. +-------------------------------------------------------+
  35. | Jelle Paul Alten                |   jalten@cs.vu.nl   |
  36. | Vrije Universiteit Amsterdam    |                     |
  37. +-------------------------------------------------------+
  38.